package klaseak;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class JTabbedPaneEjemplo extends JFrame {

public JTabbedPaneEjemplo(String title) {
super(title);
addComponents();
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(350, 200);
setVisible(true);
}

protected void addComponents() {
JTabbedPaneWithCloseIcon tabbedPane = new JTabbedPaneWithCloseIcon();

JPanel buttonPanel1 = new JPanel();
tabbedPane.addTab("Tab 1", buttonPanel1);

JPanel buttonPanel2 = new JPanel();
tabbedPane.addTab("Tab 2", buttonPanel2);


JPanel buttonPanel3 = new JPanel();
tabbedPane.addTab("Tab 3", buttonPanel3);

}

public static void main(String args[]) {
new JTabbedPaneEjemplo("Ejemplo JTabbedPane");
}
}